package shc.graduation.http.query;

import org.litepal.crud.DataSupport;

import shc.graduation.bean.PaperInfo;

/**
 * Created by shuhuiChen on  2016/5/21  18:42.
 * Email ：shuhuiCSH@126.com
 */
public class PaperInfoQuery extends BaseQuery<PaperInfo> {

    @Override
    public void query() {

        mListModel = DataSupport.where("papergroup_id = ?", String.valueOf(mStateEvent.group + ""))
                .offset(mStateEvent.index * limit)
                .limit(limit)
                .order("papertime desc")
                .find(PaperInfo.class, true);

        mStateEvent.model = mListModel;

        callBackSuccess(mStateEvent, "查询成功");
    }

}
